package com.ruoyi.mapper;

import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.domain.RegisterDetailedOrder;
import com.ruoyi.domain.RegisterSummaryOrder;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface OrderRegisterMapper {

    int insertOrderRegister(Map map);

    List<Map> getReserveRegisterList(Map map);

    int getReserveRegisterCount(Map map);

    List<RegisterDetailedOrder> getDetailedExport(Map map);

    List<RegisterSummaryOrder> getSummaryExport(Map map);

    Map getReserveRegisterById(String id);

    int deleteRegisterById(String id);

    List<Map> getOrderRegisterPayment(Map map);

    int deleteRegisterBatchByBatchId(String batchId);

    int getRegisterCountByOrderCode(@Param("orderCode") String orderCode,@Param("eOrderCode") String eOrderCode);

    List<Map> getOrderRegisterRefund(Map map);

    BigDecimal getHotelDfkPrice(String hotelId);

    int insertRegisterPayment(@Param("paymentInfo") JSONObject paymentInfo, @Param("batchId") String batchId);

    int updateRegisterPayment(JSONObject paymentInfo);

    int insertRegisterRefund(JSONObject refundInfo);

    int updateRegisterRefund(JSONObject paymentInfo);

    int postEditPaymentInfo(Map map);

    List<Map> getZfqdPaymentPriceSumByBatchId(String batchId);

    int insertZfqdPaymentPriceSum(@Param("batchId") String batchId, @Param("zfqdPaymentPrice") List<Map> zfqdPaymentPriceSum);

    String getBatchIdByRegisterId(String registerId);

    List<Map> getOrderListByBatchId(String batchId);

    String getBaoShangToken();

    int updateBaoShangToken(String token);

    int insertCopyRegister(String id);

    // 找出该id支付的所有批次id
    List<String> getPaymentBatchIdById(String id);

    // 删除支付记录
    int deletePaymentInfoById(String id);

    // 删除返款记录
    int deleteRefundInfoById(String id);

    // 删除批次表数据
    int deleteBatchByBatchId(@Param("batchIds") List<String> batchIds);

    // 插入日志表
    int insertRegisterLog(@Param("logDescribe") String logDescribe,@Param("userId") Long userId);

    // 昨日待支付条数
    int getYesterdayPaymentPendingCount();
}
